<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>Hello APP</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <style>
        html,body {
            height: 100%;
        }
        
        header {
            position: relative;
            width: 100%;
            height: 50px;
            background-color: #f0f;
        }
        
        header h1 {
            position: relative;
            height: 50px;
            line-height: 50px;
            font-size: 20px;
            color: #fff;
            text-align: center;
        }
        
        header .left {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100px;
            height: 50px;
            line-height: 50px;
            font-size: 16px;
            color: #fff;
            text-align: center;
        }
        
        header .right {
            position: absolute;
            bottom: 0;
            right: 0;
            width: 100px;
            height: 50px;
            line-height: 50px;
            font-size: 16px;
            color: #fff;
            text-align: center;
        }
        .center{
            text-align: center;
        }
        .content{
            font-size: 16px;
        }
        .content .desc{
            text-align: justify;
            margin-bottom:20px;
            font-size: 16px;
        }
        .content .contact{
            color: #666666;
            font-size: 16px;
        }
        img{
            width: 33.3%;
        }
        .animation{
            width:100px;
            height:100px;
            background:red;
            position:relative;
            animation:myfirst 5s;
            -moz-animation:myfirst 5s; /* Firefox */
            -webkit-animation:myfirst 5s; /* Safari and Chrome */
            -o-animation:myfirst 5s; /* Opera */
            }

            @keyframes myfirst
            {
            0%   {background:red; left:0px; top:0px;}
            25%  {background:yellow; left:200px; top:0px;}
            50%  {background:blue; left:200px; top:200px;}
            75%  {background:green; left:0px; top:200px;}
            100% {background:red; left:0px; top:0px;}
            }

            @-moz-keyframes myfirst /* Firefox */
            {
            0%   {background:red; left:0px; top:0px;}
            25%  {background:yellow; left:200px; top:0px;}
            50%  {background:blue; left:200px; top:200px;}
            75%  {background:green; left:0px; top:200px;}
            100% {background:red; left:0px; top:0px;}
            }

            @-webkit-keyframes myfirst /* Safari and Chrome */
            {
            0%   {background:red; left:0px; top:0px;}
            25%  {background:yellow; left:200px; top:0px;}
            50%  {background:blue; left:200px; top:200px;}
            75%  {background:green; left:0px; top:200px;}
            100% {background:red; left:0px; top:0px;}
            }

            @-o-keyframes myfirst /* Opera */
            {
            0%   {background:red; left:0px; top:0px;}
            25%  {background:yellow; left:200px; top:0px;}
            50%  {background:blue; left:200px; top:200px;}
            75%  {background:green; left:0px; top:200px;}
            100% {background:red; left:0px; top:0px;}
            }
    </style>
</head>

<body>
    <div id="main">
        <header>
            <h1>每日优鲜</h1>
            <div class="left" tapmode @click="fnOpenCitySelectFrame">选择城市</div>
            <div class="right" tapmode @click="fnOpenPersonCenterWin">个人中心</div>
        </header>
        <div class="animation"></div>
        <div>
            <p class="desc">桃宝宝是一款致力打造线上电竞娱乐平台，为英雄联盟、炉石传说、王者荣耀、守望先锋、DOTA2等游戏提供专业线上教学，更好的帮助王佳在有种提升自我实例，成为顶尖强者！桃宝宝还同时开放聊天室，为玩家提供全面的游戏教学和交友环境。</p>
            <p class="contact"><span>在线客服联系QQ:</span><span>2606223309</span></p>
            <p class="contact"><span>宝宝群:</span><span>338675798</span></p>
            <img :src="item.head" v-for="(item,index) in userList">
        </div>
    </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vue"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript">

apiready = function() {
    var vm = new Vue({
        el: '#main',
        data: {
            userList:[]
        },
        mounted:function(){
            this.getList();
        },
        methods:{
            fnOpenCitySelectFrame:function() {
                openNewFrame({
                    name:'cityselect_frame',
                    rect:{ 
                        x: 0,
                        y: 50,
                        w: 'auto',
                        h: 'auto'
                    },
                    params:{
                        name:'test'
                    }
                });
            },
            fnOpenPersonCenterWin:function() {
                openNewWin({
                    name:'login',
                    params:{
                        name: 'test'
                    }
                });
            },
            getList:function(){
                var _this = this;
                ajaxRequest({
                    url:'api/user/discover/list',
                    method:'get',
                    data:{
                        p:1,
                        row:100,
                        sex:1,
                        time:0
                    },
                    callback:function(ret){
                        _this.userList = ret.data;
                    }
                })
            }
        }
    });
};


</script>

</html>
